package my.projects.jandan.main;

import my.projects.jandan.test.HtmlParser3;
import my.projects.jandan.test.SimpleHttpClient3;
import my.projects.jandan.thread.ThreadPoolMananger;
import my.projects.jandan.utils.Constants;
import my.projects.jandan.utils.HtmlParser2;
import my.projects.jandan.utils.SimpleHttpClient;

public class Main {

	public static void main(String[] args) {
		// System.out.println(Integer.MAX_VALUE);
		 new ThreadPoolMananger();
		// testParse2();
		// testParse3();
//		testJanDanNew();
	}

	static void testParse2() {
		String html = new SimpleHttpClient().get(Constants.URL_TOUXIANGWANG);
		HtmlParser2 parse = new HtmlParser2(html);
		parse.getPageNavi();
	}

	static void testParse3() {
		String html = new SimpleHttpClient().get(Constants.URL_TOUXIANGWANG);
		HtmlParser2 parse = new HtmlParser2(html);
		parse.handleImgs();
	}

	static void testJanDanNew() {
		String Url = "http://jiandan.net/new";
		HtmlParser3 parse = new HtmlParser3();
		SimpleHttpClient3 client = new SimpleHttpClient3();
		parse.setHtml(client.get(Url));
		parse.handleTitles();
	}
}
